import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:tianpu_edu/Classes/Find/View/FindView.dart';
import 'package:tianpu_edu/Classes/libs/tool_base_page.dart';

class FindPage extends CatBaseWidgetPage {
  @override
  _FindPageState getState() => _FindPageState();
}

class _FindPageState extends CatBaseWidgetPageState<FindPage> {

  TabController _tabController;

  @override
  void initState() {
    super.initState();
    isBuild = true;


  }

  @override
  Widget buildWidget(BuildContext context) {
    var width = MediaQuery.of(context).size.width;
    return DefaultTabController(
      initialIndex: 0,
      length: 2,
      child: Scaffold(
        appBar: AppBar(
          centerTitle: false,
          title: Text('学习',style: textStyle(),),
          backgroundColor: Colors.white,//设置导航背景颜色
          bottom:  TabBar(
              // indicatorPadding: EdgeInsets.only(left:0,right: 0,top: 0,bottom: 0),
              tabs: <Widget>[
            Tab(child: Text('直播',style: textStyle(),),),
            Tab(child: Text('录播',style: textStyle(),),),

          ]),
        ),
        body:TabBarView(
          children: <Widget>[
            FindView(text: '直播',),
            FindView(text: '录播',),
          ],
        ),

      ),
    );
  }



}

// Column(
// children: <Widget>[
// Container(height: 40,color: Colors.blue,
// child: Row(children: <Widget>[
// SizedBox(width: 6,),
// Text('直播'),
// SizedBox(width: 6,),
// Text('回放'),
// ],),),
//
// ],
// )